<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>患者注册</title>
    <script src="../../js/common.js"></script>
    <link rel="stylesheet" href="../../css/common.css">
    <link rel="stylesheet" href="../../css/patient/setPassword.css">
</head>

<body>
    <div class="container">
        <div class="loginLogo">
            <img src="../../images/doctor/loginLogo.png" alt="">
            <p>患者手机绑定</p>
        </div>
        <div class="form">
            <form action="">
                <div class="password clearfix msg">
                    <div class="fl icon">
                        <img src="../../images/doctor/lock.png" alt="">
                    </div>
                    <input type="password" placeholder="请输入您的密码" class="fl" id="password" maxlength="6">
                </div>
                <div class="password clearfix msg">
                    <div class="fl icon">
                        <img src="../../images/doctor/lock.png" alt="">
                    </div>
                    <input type="password" placeholder="请确认密码" class="fl" id="confirmPassword" maxlength="6">
                </div>
                <button type="button" class="confirmBtn" id="confirmBtn">确&nbsp;认</button>
            </form>
            <div class="AlertBlock" id="AlertBlock"></div>
        </div>
    </div>


</body>
<script src="../../js/jquery-1.11.3.min.js"></script>
<script>
    //点击确认按钮，进行密码的验证
    $("#confirmBtn").click(function () {
        if ($("#password").val() == "") {
            DoAlert("密码不能为空");
            return
        } else if (!(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$/.test($("#password").val()))) {
            DoAlert("请输入6-16数字与字母组合的密码");
            return
        }
        if ($("#confirmPassword").val() != $("#password").val()) {
            DoAlert("前后密码不一致");
            return
        }
    })
</script>

</html>